<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
// This is a regression test for https://bugs.webkit.org/show_bug.cgi?id=32131
test(() => assert_selection(
  [
  '<div contenteditable>',
    '^<u>',
    '<img><br>',
    '<div>',
      '<ul>',
        '<li>',
          '<span><u>',
            '<div style="text-align:right; display: inline;">',
              '<span><u>text|</u></span>',
            '</div>',
          '</u></span>',
        '</li>',
      '</ul>',
    '</div>',
    '</u>',
  '</div>'
  ],
  'insertorderedlist',
  [
  '<div contenteditable>',
    '<ol>',
      '<li>',
        '<u>',
          '^<img>',
        '</u>',
      '</li>',
    '</ol>',
    '<u>',
      '<ol>',
        '<li>',
          '<span><u>',
            '<div style="text-align:right; display: inline;">',
              '<span><u>text|</u></span>',
            '</div>',
          '</u></span>',
        '</li>',
      '</ol>',
    '</u>',
  '</div>'
  ]),
  "indertOrderedList shoud work when the selection is crossing ul.");
</script>
